<%@ page language="java" contentType="text/xml; charset=UTF-8" pageEncoding="UTF-8"  trimDirectiveWhitespaces="true" session="false" %>
<%@include file="../include/taglibs.jsp"%>
<%@include file="../include/urls.jsp"%>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<games href="${gamesUrl}">
	<c:forEach var="game" items="${games}">
	<game	id="${game.id}" 
			title="${game.title}"
			creationTime="${game.creationTime}"
			href="${gamesUrl}${game.id}">
			<owner name="${game.owner.name}" href="${playersUrl}${game.owner.id}" />
			<c:if test="${game.winner}">  
			<winner name="${game.winner.name}" href="${playersUrl}${game.winner.id}" />
			</c:if>
	</game>
</c:forEach>
</games>
